home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / pcvmm.exe / PCVMM.DOC < prev    next >
Text File  |  1990-03-16  |  2KB  |  56 lines

  1. pcvmm.doc              Tuesday, March 1, 1990 1:00 pm                 Page 1
  2.  
  3. **********************************************************************
  4. public functions - requires at least MSC 5.0+
  5. **********************************************************************
  6.  
  7. unsigned int open_vmm(cha *swappath);
  8.         This function inits. the VMM system. It will return ZERO
  9.         on success otherwise a number indicating an error:
  10.  
  11.         VMM_ERR_NO_PAGE_MEM     1
  12.             Not enough memory for page structures.
  13.  
  14.  
  15.         VMM_ERR_NO_SWAP_FILE    2
  16.             Could not create swap file
  17.  
  18. VHAND vmm_alloc(unsigned short size);
  19.         Allocate size bytes in virtual memory heap. Returns a virtual
  20.         handle (VHAND) that represents an allocated memory chunk. You
  21.         must use vmm_deref() to bring the memory chunk into real
  22.         memory.
  23.  
  24. VHAND vmm_realloc( VHAND vh, USHORT size );
  25.         Re-allocate virtual memory chunk to passed size.
  26.  
  27. void far *vmm_deref( VHAND vmmaddr );
  28.         Obtain a real memory address for passed virtual handle. The
  29.         virtual memory page is only guaranteed to be in real memory
  30.         until the next call to a vmm function.
  31.  
  32.  
  33. USHORT vmm_size( VHAND vh)
  34.         Returns the size in bytes of the allocated memory block. All
  35.         allocations are rounded to an even number. So if the allocation
  36.         request was three bytes it would be rounded to four bytes.
  37.  
  38. void vmm_dump(void)
  39.         This procedure will dump all memory pages to external memory. This
  40.         frees all DOS allocated memory. The next allocation or de-reference
  41.         will start the DOS allocation process again.
  42.  
  43. void vmm_pack(void)
  44.         This procedure will coalesce one "in memory" page for each call.
  45.         This routine is intended to perform background packing of the heap.
  46.  
  47. void vmm_free( VHAND vh );
  48.         Free virtual memory chunk.
  49.  
  50. void close_vmm(void);
  51.         This function frees memory used by VMM system and removes
  52.         the swap file.
  53.  
  54. *EOF*
  55.  
  56.